import { Entity, CreateDate, UpdateDate, PrimaryUuid, Code, MemberId, Openid, ShopCodeStatus, Unique } from '@sker/core'
@Entity({ name: 'shop_code' })
@Unique('UK_SHOP_CODE_CODE', ['code'])
export class ShopCode {
    static title: string = `收货码`;
    static resource: string = `shop_code`;

    @PrimaryUuid({
        primaryKeyConstraintName: 'PK_SHOP_CODE_ID'
    })
    id!: string;

    @Openid()
    openid!: string;

    @MemberId({ comment: '会员ID' })
    member_id!: string;

    @Code({comment: '取货码'})
    code!: string;

    @ShopCodeStatus()
    status!: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}